﻿
@{
    ViewBag.Title = "HiddenTroubleAdd";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}
@section css {
    <link href="~/Assets/css/lib/bootstrap-select.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/fileinput.css" rel="stylesheet" />
    <style>
        th {
            text-align: center;
            font-weight: bold;
        }

        td {
            text-align: center;
            vertical-align: middle;
        }
        .center {
            position: fixed;
            top: 50%;
            left: 50%;
            background-color: #000;
            width: 600px;
            -webkit-transform: translateX(-50%) translateY(-50%);
            -moz-transform: translateX(-50%) translateY(-50%);
            -ms-transform: translateX(-50%) translateY(-50%);
            transform: translateX(-50%) translateY(-50%);
            border-radius: 3px;
        }
    </style>
}
<div class="page-content" ng-cloak ng-controller="HiddenTroubleController" ng-init="FormId='@(Request.QueryString["FormId"].IsEmpty() ? "0" : Request.QueryString["FormId"])';
     page='@(Request.QueryString["page"].IsEmpty() ? "1" : Request.QueryString["page"])';
     name='@(Request.QueryString["name"].IsEmpty() ? "1" : Request.QueryString["name"])';
     name = '@(Request.QueryString["page"].IsEmpty() ? Request.QueryString["name"]:  Request.QueryString["name"]+"?page="+Request.QueryString["page"])';
     GetFactoryArea();
     GetSourceList();
     BindDepartmentList('Dep_Select');
     GetHiddenTroubleLevelList();
     GetHiddenTroubleType();
     GetHiddenTroubleState();
     GetHiddenTroubleState();
     GetHiddenTroubleEditDetail(FormId);
     GetReviewList(FormId);
     ">
    <div class="load" ng-show="DataLoading">
        <div class="loader">
            <svg version="1.1" id="loader-1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
            <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />

			</path>
		</svg>
            <div class="load-msg" ng-bind="LoadingMsg"></div>
        </div>
    </div>
    <div class="load" id="previewimg" ng-show="IsPreview" ng-click="ClosePreview();">
        <img id="imgshow" class="center" />
    </div>
    <div class="page-heading">
        <h1>问题详细信息</h1>
        <div class="options">
            <div class="btn-toolbar">

            </div>
        </div>
    </div>
    <ol class="breadcrumb">
        <li><a>主页</a></li>
        <li><a>问题治理</a></li>
        <li><a>问题台账</a></li>
        <li class="active"><a>问题详细</a></li>
    </ol>
    <form id="HiddenTroubleForm" class="form-horizontal row-border">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <div id="basicinfo" class="panel panel-sky">
                        <div class="panel-heading"><h2>问题信息 编号：{{HiddenTroubleEditModel.FormNo}}</h2></div>
                        <div class="panel-body">

                            <div class="form-group">

                                <label class="col-sm-1 control-label">园区：</label>
                                <div class="col-sm-3">
                                    <select ng-model="HiddenTroubleEditModel.FactoryAreaId" ng-change="" class="form-control" disabled>
                                        <option value="">请选择园区</option>
                                        <option ng-repeat="x in FactoryArea" value="{{x.Id}}">{{x.ParkName}}</option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">责任部门：</label>
                                <div class="col-sm-3">
                                    <select disabled id="Dep_Select" class="selectpicker show-tick form-control" ng-model="HiddenTroubleEditModel.DepartmentId" ng-change="GetTeamListByDepartment(HiddenTroubleEditModel.DepartmentId);GetEmployeeByDepartment(HiddenTroubleEditModel.DepartmentId);" data-live-search="true">
                                        <option value="0">请选择责任部门</option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">责任人：</label>
                                <div class="col-sm-3">
                                    <select ng-model="HiddenTroubleEditModel.ResponsibleEmloyeeNo" class="form-control" disabled>
                                        <option value="">请选择责任人</option>
                                        <option ng-repeat="x in EmployeeList" value="{{x.EmployeeNo}}">{{x.EmployeeNo}}-{{x.EmployeeName}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">来源：</label>
                                <div class="col-sm-3" id="div_typeselect">
                                    <select ng-model="HiddenTroubleEditModel.SourceId" ng-change="" class="form-control" disabled>
                                        <option value="">请选择来源</option>
                                        <option ng-repeat="x in SourceList" value="{{x.Id}}">{{x.Source}}</option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">问题分类：</label>
                                <div class="col-sm-3" id="div_typeselect">
                                    <select disabled ng-model="HiddenTroubleEditModel.HiddenTroubleCategoryId" ng-change="GetHiddenTroubleTypeChild(AddModel.HiddenTroubleCategoryId,'div_typeselect');" class="form-control">
                                        <option value="">请选择问题分类</option>
                                        <option ng-repeat="x in CategoryList" value="{{x.Id}}">{{x.TypeName}}</option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">问题子类：</label>
                                <div class="col-sm-3" id="div_typeselect">
                                    <select disabled ng-model="HiddenTroubleEditModel.TypeId" class="form-control">
                                        <option value="">请选择问题子类</option>
                                        <option ng-repeat="x in CategoryChildList" value="{{x.Id}}">{{x.TypeName}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>问题等级：</label>
                                <div class="col-sm-3">
                                    <select ng-model="HiddenTroubleEditModel.LevelId" disabled class="form-control">
                                        <option value="">请选择问题等级</option>
                                        <option ng-repeat="x in LevelList" value="{{x.Id}}" title="{{x.Description}}">{{x.LevelName}}</option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">检查时间：</label>
                                <div class="col-sm-3">
                                    <input disabled id="startTime" class="form-control" ng-model="HiddenTroubleEditModel.CheckTime" />
                                </div>

                                <label class="col-sm-1 control-label">登记人：</label>
                                <div class="col-sm-3">
                                    <input disabled type="text" class="form-control" placeholder="地点/部位" ng-model="HiddenTroubleEditModel.CreateUserName" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">场所：</label>
                                <div class="col-sm-3">
                                    <select id="placelist" class="selectpicker show-tick form-control" ng-change="refreshOption('placelist');" ng-model="HiddenTroubleEditModel.PlaceId" data-live-search="true" disabled>
                                        <option value="" selected>请选择场所</option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">地点/部位：</label>
                                <div class="col-sm-3">
                                    <input disabled type="text" class="form-control" placeholder="地点/部位" ng-model="HiddenTroubleEditModel.Location" />
                                </div>
                                <label class="col-sm-1 control-label">当前状态：</label>
                                <div class="col-sm-3">
                                    <select class="form-control" ng-model="HiddenTroubleEditModel.State" disabled>
                                        <option value="" ng-selected="true">选择整改状态</option>
                                        <option ng-repeat="x in StateList" value="{{x.Id}}">{{x.StateName}}</option>
                                    </select>
                                </div>
                                @*<label class="col-sm-1 control-label">整改进度：</label>
                                    <div class="col-sm-2">
                                        <div class="progress progress-striped" style="margin-top:15px;">
                                            <div class="progress-bar progress-bar-info" ng-style="{'width':HiddenTroubleEditModel.Process +'%'}"></div>
                                        </div>
                                    </div>
                                    <label class="col-sm-1 control-label" style="text-align:left;">{{HiddenTroubleEditModel.Process}}%</label>*@
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">问题内容：</label>
                                <div class="col-sm-8">
                                    <textarea disabled class="form-control autosize" ng-model="HiddenTroubleEditModel.Description" style="overflow-wrap: break-word; resize: horizontal; height: 60px;"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">整改要求：</label>
                                <div class="col-sm-8">
                                    <textarea disabled class="form-control autosize" ng-model="HiddenTroubleEditModel.Requirement" style=" overflow-wrap: break-word; resize: horizontal; height: 60px;"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">文件列表：</label>
                                <div class="col-sm-8">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th style="width:5%">序号</th>
                                                <th style="width:30%">文件名称</th>
                                                <th style="width:30%">缩略图</th>
                                                <th style="width:10%">文件大小(kb)</th>
                                                <th style="width:10%">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr ng-show="HiddenTroubleEditModel.FileList.length==0">
                                                <td colspan="4" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                                            </tr>
                                            <tr ng-repeat="x in HiddenTroubleEditModel.FileList">
                                                <td ng-bind="$index+1"></td>
                                                <td ng-bind="x.FileName"></td>
                                                <td><a ng-click="ShowPicture(x.FilePath);"><img ng-src="{{x.FilePath}}" width="50"></td>
                                                <td ng-bind="x.FileSize"></td>
                                                <td>
                                                    <a href="../Download/DownloadFile?FileId={{x.FileId}}" class="btn btn-success btn-xs btn-label"><i class="fa fa-download"></i>下载</a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row" ng-repeat="s in HiddenTroubleEditModel.SolutionList">
                <div class="col-md-12">
                    <div class="panel panel-sky">
                        <div class="panel-heading">
                            <h2>问题整改措施 {{$index+1}}</h2>
                            <div class="panel-ctrls">
                                <div class="btn-group">

                                </div>
                            </div>
                        </div>
                        <div class="panel-body" id="SolutionItems">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">计划完成时间：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="s.PlanCompleteTime|JSONDate:'yyyy-MM-dd'" disabled />
                                </div>
                                @*<label class="col-sm-1 control-label">责任班组：</label>
                                    <div class="col-sm-2">
                                        <input type="text" class="form-control" ng-model="s.TeamName" disabled />
                                    </div>*@
                                <label class="col-sm-1 control-label">联系部门：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="s.DepartmentName" disabled />
                                </div>
                                <label class="col-sm-1 control-label">联系人：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="s.Responsible" disabled />
                                </div>
                                <label class="col-sm-1 control-label">设施设备：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="s.EquTypeAndDep" disabled />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">整改措施：</label>
                                <div class="col-sm-8">
                                    <textarea class="form-control autosize" ng-model="s.SolutionContent" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 50px;" disabled></textarea>
                                </div>
                            </div>

                            @*<div class="form-group">
                                    <label class="col-sm-1 control-label">整改进度：</label>
                                    <div class="col-sm-5">
                                        <div class="progress progress-striped" style="margin-top:15px;">
                                            <div class="progress-bar progress-bar-info" ng-style="{'width':s.Process +'%'}"></div>
                                        </div>
                                    </div>
                                    <label class="col-sm-1 control-label" style="text-align:left;font-weight:bold;">{{s.Process}}%</label>
                                </div>*@
                            <div class="form-group">
                                <label class="col-sm-1 control-label">文件列表：</label>
                                <div class="col-sm-8">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th style="width:5%">序号</th>
                                                <th style="width:30%">文件名称</th>
                                                <th style="width:10%">文件大小(kb)</th>
                                                <th style="width:10%">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr ng-show="s.FileList.length==0">
                                                <td colspan="4" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                                            </tr>
                                            <tr ng-repeat="x in s.FileList">
                                                <td ng-bind="$index+1"></td>
                                                <td ng-bind="x.FileName"></td>
                                                <td ng-bind="x.FileSize"></td>
                                                <td>
                                                    <a href="../Download/DownloadFile?FileId={{x.FileId}}" class="btn btn-success btn-xs btn-label"><i class="fa fa-download"></i>下载</a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">整改记录：</label>
                                <div class="col-sm-8">
                                    <div class="row">
                                        <div class="col-md-12" ng-repeat="r in s.RectificationRecordList">
                                            <h3 class="timeline-month"><span class="month">{{r.OperateTime|JSONDate:'MM-dd'}}</span> <span class="year">{{r.OperateTime| JSONDate:'yyyy'}}</span></h3>
                                            <ul class="timeline">
                                                <li ng-show="r.IsComplete==false" class="timeline-midnightblue">
                                                    <div class="timeline-icon"><i class="fa fa-wrench"></i></div>
                                                    <div class="timeline-body">
                                                        <div class="timeline-header">
                                                            <span class="date">{{r.OperateTime|JSONDate:'yyyy-MM-dd'}}</span>
                                                        </div>
                                                        <div class="timeline-content">
                                                            <h3>本次整改进度：{{r.Process}}%</h3>
                                                            <p>{{r.Description}}</p>
                                                            <div class="form-group" style="border-top:0px;" ng-show="r.FileList.length>0">
                                                                <label class="col-sm-2 control-label">文件列表：</label>
                                                                <div class="col-sm-8">
                                                                    <table class="table table-striped table-bordered table-hover">
                                                                        <thead>
                                                                            <tr>
                                                                                <th style="width:5%">序号</th>
                                                                                <th style="width:30%">文件名称</th>
                                                                                <th style="width:10%">文件大小(kb)</th>
                                                                                <th style="width:10%">操作</th>
                                                                            </tr>
                                                                        </thead>
                                                                        <tbody>
                                                                            <tr ng-show="r.FileList.length==0">
                                                                                <td colspan="4" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                                                                            </tr>
                                                                            <tr ng-repeat="rf in r.FileList">
                                                                                <td ng-bind="$index+1"></td>
                                                                                <td ng-bind="rf.FileName"></td>
                                                                                <td ng-bind="rf.FileSize"></td>
                                                                                <td>
                                                                                    <a href="../Download/DownloadFile?FileId={{rf.FileId}}" class="btn btn-success btn-xs btn-label"><i class="fa fa-download"></i>下载</a>
                                                                                </td>
                                                                            </tr>
                                                                        </tbody>
                                                                    </table>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </li>
                                                <li ng-show="r.IsComplete==true" class="timeline-success">
                                                    <div class="timeline-icon"><i class="fa fa-wrench"></i></div>
                                                    <div class="timeline-body">
                                                        <div class="timeline-header">
                                                            <span class="date">{{r.OperateTime|JSONDate:'yyyy-MM-dd'}}</span>
                                                        </div>
                                                        <div class="timeline-content">
                                                            <h3>本次整改进度：{{r.Process}}%</h3>
                                                            <p>{{r.Description}}</p>
                                                            <div class="form-group" style="border-top:0px;" ng-show="r.FileList.length>0">
                                                                <label class="col-sm-2 control-label">文件列表：</label>
                                                                <div class="col-sm-8">
                                                                    <table class="table table-striped table-bordered table-hover">
                                                                        <thead>
                                                                            <tr>
                                                                                <th style="width:5%">序号</th>
                                                                                <th style="width:30%">文件名称</th>
                                                                                <th style="width:10%">文件大小(kb)</th>
                                                                                <th style="width:10%">操作</th>
                                                                            </tr>
                                                                        </thead>
                                                                        <tbody>
                                                                            <tr ng-show="r.FileList.length==0">
                                                                                <td colspan="4" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                                                                            </tr>
                                                                            <tr ng-repeat="rf in r.FileList">
                                                                                <td ng-bind="$index+1"></td>
                                                                                <td ng-bind="rf.FileName"></td>
                                                                                <td ng-bind="rf.FileSize"></td>
                                                                                <td>
                                                                                    <a href="../Download/DownloadFile?FileId={{rf.FileId}}" class="btn btn-success btn-xs btn-label"><i class="fa fa-download"></i>下载</a>
                                                                                </td>
                                                                            </tr>
                                                                        </tbody>
                                                                    </table>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row" ng-repeat="s in ReviewList">
                <div class="col-md-12">
                    <div class="panel panel-sky">
                        <div class="panel-heading">
                            <h2>问题复查 {{$index+1}}</h2>
                            <div class="panel-ctrls">
                                <div class="btn-group">

                                </div>
                            </div>
                        </div>
                        <div class="panel-body" id="">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">复查时间：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="s.ReviewTime|JSONDate:'yyyy-MM-dd'" disabled />
                                </div>
                                <label class="col-sm-1 control-label">复查人：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="s.CreateUserName" disabled />
                                </div>
                                <label class="col-sm-1 control-label">复查结果：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="s.CreateUserName|GetReviewState" disabled />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">复查情况：</label>
                                <div class="col-sm-8">
                                    <textarea class="form-control autosize" ng-model="s.Description" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 50px;" disabled></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">文件列表：</label>
                                <div class="col-sm-8">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th style="width:5%">序号</th>
                                                <th style="width:30%">文件名称</th>
                                                <th style="width:10%">文件大小(kb)</th>
                                                <th style="width:10%">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr ng-show="s.FileList.length==0">
                                                <td colspan="4" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                                            </tr>
                                            <tr ng-repeat="x in s.FileList">
                                                <td ng-bind="$index+1"></td>
                                                <td ng-bind="x.FileName"></td>
                                                <td ng-bind="x.FileSize"></td>
                                                <td>
                                                    <a href="../Download/DownloadFile?FileId={{x.FileId}}" class="btn btn-success btn-xs btn-label"><i class="fa fa-download"></i>下载</a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <div class="col-sm-6 col-sm-offset-2">
                            <a href="{{name}}" class="btn-default btn">返回</a>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </form>
</div>


@section Js{
    <script src="~/Assets/js/pg/HiddenTrouble.js?v=@DateTime.Now.ToString("yyMMddHHmmss")"></script>
    <script src="~/Assets/js/libs/moment.min.js"></script>
    <script src="~/Assets/js/libs/locales/date/zh-cn.js"></script>
    <script src="~/Assets/js/libs/bootstrap-datetimepicker.min.js"></script>
    <script src="~/Assets/js/libs/angularjs-datepicker.js"></script>
    <script src="~/Assets/js/libs/fileinput.js"></script>
    <script src="~/Assets/js/libs/zh.js"></script>
    <script>
        $('#docfiles').fileinput({
            language: 'zh'
        });

    </script>
}